import { mediaGroupQueue } from "@/api/service/lcd-queue/lcdQueue";
import { resetForm, showForm } from "../data/form";
import { query, table } from "./table";

export const list = async () => {
  table.value.data = [];
  table.value.loading = true;
  console.log(query.value);

  const data = await mediaGroupQueue({
    ...query.value,
    filterId: ""
  });
  query.value.total = data.total;
  table.value.data = data.rows;
  table.value.loading = false;
};

export const edit = async () => {
  showForm.value = true;
};
export const create = async () => {
  resetForm();
  showForm.value = true;
};
export const search = async () => {
  query.value.pageNum = 1;
  await list();
};

// export const getDetail = (data: any) => {
//   displayDetail.value = true;
//   detailQuery.value.batchName = data.batchName;
//   listDetail();
// };
